import 'package:flutter_test/flutter_test.dart';
import 'package:zx_flutter_container_plugin/zx_flutter_container_plugin.dart';
import 'package:zx_flutter_container_plugin/zx_flutter_container_plugin_platform_interface.dart';
import 'package:zx_flutter_container_plugin/zx_flutter_container_plugin_method_channel.dart';
import 'package:plugin_platform_interface/plugin_platform_interface.dart';

class MockZxFlutterContainerPluginPlatform
    with MockPlatformInterfaceMixin
    implements ZxFlutterContainerPluginPlatform {

  @override
  Future<String?> getPlatformVersion() => Future.value('42');
}

void main() {
  final ZxFlutterContainerPluginPlatform initialPlatform = ZxFlutterContainerPluginPlatform.instance;

  test('$MethodChannelZxFlutterContainerPlugin is the default instance', () {
    expect(initialPlatform, isInstanceOf<MethodChannelZxFlutterContainerPlugin>());
  });

  test('getPlatformVersion', () async {
    ZxFlutterContainerPlugin zxFlutterContainerPlugin = ZxFlutterContainerPlugin();
    MockZxFlutterContainerPluginPlatform fakePlatform = MockZxFlutterContainerPluginPlatform();
    ZxFlutterContainerPluginPlatform.instance = fakePlatform;

    expect(await zxFlutterContainerPlugin.getPlatformVersion(), '42');
  });
}
